using System;
using System.Collections.Generic;
using SouthernLand.Common.DAL.NhaDat;

namespace SouthernLand.Common.BOL.NhaDat
{
    public class HuongNha
    {
        #region Public Properties

        public Int32 HuongNhaID { get; set; }

        public String TenHuongNha { get; set; }

        public String TenHuongNha_en { get; set; }

        #endregion

        #region public static Methods

        public static string GetTenHuongNhaByID(int ID)
        {
            try
            {
                HuongNha obj = GetHuongNhaByID(ID);
                return Globals.GetLang(obj.TenHuongNha, obj.TenHuongNha_en);
            }
            catch
            {
                return "";
            }
        }

        public static int Insert(HuongNha obj)
        {
            var db = new HuongNhaDAL();
            return db.Insert(obj);
        }

        public static bool Update(HuongNha obj)
        {
            var db = new HuongNhaDAL();
            return db.Update(obj);
        }

        public static bool Delete(Int32 HuongNhaID)
        {
            var db = new HuongNhaDAL();
            return db.Delete(HuongNhaID);
        }

        public static HuongNha GetHuongNhaByID(Int32 HuongNhaID)
        {
            var db = new HuongNhaDAL();
            return db.GetHuongNhaByID(HuongNhaID);
        }

        //Get All HuongNha
        public static List<HuongNha> GetAllHuongNha()
        {
            var db = new HuongNhaDAL();
            return db.GetAllHuongNha(1, 10000);
        }

        //Get All HuongNha
        public static List<HuongNha> GetAllHuongNha(int PageIndex, int PageSize)
        {
            var db = new HuongNhaDAL();
            return db.GetAllHuongNha(PageIndex, PageSize);
        }

        // Get Count All records of Table  HuongNha
        public static int GetCountHuongNha()
        {
            var db = new HuongNhaDAL();
            return db.GetCountHuongNha();
        }

        #endregion
    }
}